package com.lance.answer.question_export;

import com.alibaba.fastjson.JSON;
import com.google.common.collect.Sets;
import org.apache.commons.io.IOUtils;

import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.List;
import java.util.Set;

public class TT {

    public static void main(String[] args) throws Exception {


        // http://xinjiang.ouchn.cn/mod/url/view.php?id=343844

        for(int k =343844;k<343900;k++){
            System.err.println("http://xinjiang.ouchn.cn/mod/url/view.php?id="+k);
        }


        String ssss = "本次得分\n" +
                "92分";
        ssss = ssss.replaceAll("\n","");
        System.err.println(ssss.substring(4,ssss.length()-1));



        List<String> list1 = IOUtils.readLines(new FileInputStream("D://CCC.txt"));

        Set<String> names = Sets.newHashSet();
        for (File file : new File("d://newAnswer").listFiles()) {
            if (file.isDirectory()) {
                continue;
            }
            try {
                String fileName = file.getName();
                String subjectName = fileName.substring(0, fileName.lastIndexOf(".")).trim();
                names.add(subjectName);
            } catch (Exception e) {
                System.out.println("error:" + file.getName());
                e.printStackTrace();
            }
        }
        Set<String> no = Sets.newHashSet();

        for(String s:list1){
            if(!names.contains(s)){
                no.add(s);
            }
        }


        for(String s:no){
            System.out.println(s);
        }



    }
}
